﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ZX.WebApp.Crm.BasePages.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

       <title>处理任务</title>
    <!--CSS file (default YUI Sam Skin) -->
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/reset-fonts-grids/reset-fonts-grids.css" />
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/container/assets/skins/sam/container.css" />
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/menu/assets/skins/sam/menu.css" />
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/button/assets/skins/sam/button.css" />
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/resize/assets/skins/sam/resize.css" />
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/layout/assets/skins/sam/layout.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/yui_2.9.0/build/datatable/assets/skins/sam/datatable.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/yui_2.9.0/build/paginator/assets/skins/sam/paginator.css" />
    <link href="../../Styles/base.css" rel="stylesheet" type="text/css" />
    <!--begin custom header content for this example-->
    <style type="text/css">
        .yui-skin-sam table
        {
            width: 100%;
        }
        
        #button-example-form fieldset, #button-example-form fieldset div
        {
            border: 2px groove #ccc;
            margin: .5em;
            padding: .5em;
        }
    </style>
    <!--end custom header content for this example-->
    <!-- Dependencies -->
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/element/element-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/datasource/datasource-min.js"></script>
    <!-- OPTIONAL: JSON Utility (for DataSource) -->
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/json/json-min.js"></script>
    <!-- OPTIONAL: Connection Manager (enables XHR for DataSource) -->
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <!-- OPTIONAL: Get Utility (enables dynamic script nodes for DataSource) -->
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/get/get-min.js"></script>
    <!-- OPTIONAL: Drag Drop (enables resizeable or reorderable columns) -->
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/dragdrop/dragdrop-min.js"></script>
    <!-- OPTIONAL: Calendar (enables calendar editors) -->
    <%--<script type="text/javascript" src="../Scripts/yui_2.9.0/build/calendar/calendar-min.js"></script>--%>
    <!-- Source files -->
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/datatable/datatable-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/paginator/paginator-min.js"></script>
    <script type="text/javascript" src="../../scripts/yui_2.9.0/build/layout/layout-min.js"></script>
    <script type="text/javascript" src="../../scripts/yui_2.9.0/build/button/button-min.js"></script>
    <script type="text/javascript" src="../../scripts/yui_2.9.0/build/container/container-min.js"></script>
    <script type="text/javascript" src="../../scripts/yui_2.9.0/build/resize/resize-min.js"></script>
    <script type="text/javascript" src="../../scripts/yui_2.9.0/build/event-delegate/event-delegate-min.js"></script>
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.json-2.2.min.js" type="text/javascript"></script>
   
    <script src="../../Scripts/Jquery/DesignForm/DesignForm.Common.js" type="text/javascript"></script>
    <script src="Workflow.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <select name="setDatDutyLevel"  id="setDatDutyLevel"></select>
    </div>

     <script language="javascript" type="text/javascript">
         $(document).ready(function () {
             init_selectDatDutyLevel();
         });
         function init_selectDatDutyLevel() {
             $.ajax({
                 type: "POST",
                 url: "../../DesignForm/TableData.aspx/GetDatDutyLevel", //获取主表信息
                 data: "{}",
                 contentType: "application/json; charset=utf-8",
                 dataType: "json",
                 async: false,
                 success: function (data) {
                     if (data.d) {
                         
                         formatSelectDatDutyLevel(data.d);
                     }
                 },
                 error: function (err) {
                     alert(err + "err");
                 }
             });


         }
 
         function formatSelectDatDutyLevel(data) {
             if (data) {
                 var person = JSON.parse(data);
                 var tbSelecct = document.getElementById("setDatDutyLevel")
                 additemtoselect(tbSelecct, '', '');
                 $.each(person, function (n, value) {
                     //do something here   
                     additemtoselect(tbSelecct, value.DisplayMember, value.ValueMember);
                 });
             }

         }
         function additemtoselect(objselect, objitemtext, objitemvalue) {
             var varitem = new Option(objitemtext, objitemvalue);
             objselect.options.add(varitem);
         }
     </script>
    </form>
</body>
</html>
